package by.dvrudenko.avtobaza.webapp.utils.renderer;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import by.dvrudenko.avtobaza.datamodel.CarType;
import by.dvrudenko.avtobaza.datamodel.City;

public class CarTypeChoiseRenderer implements IChoiceRenderer<CarType> {

	public static CarTypeChoiseRenderer INSTANCE = new CarTypeChoiseRenderer();

	private CarTypeChoiseRenderer() {
		super();
	}

	@Override
	public Object getDisplayValue(CarType carType) {
		return carType.getBrand() +" "  + carType.getModel() +" " + carType.getType();
	}

	@Override
	public String getIdValue(CarType carType, int index) {
		return carType.getId().toString();
	}

}
